<template>
	
	<view class="button-list e-flex e-flex-end" v-if="info.state === 0">
		<button class="button-white e-m-r-20"  @tap="click(1)">{{ $t('order.取消订单') }}</button>
		<!-- <button  @tap="click(2)">{{ $t('order.立即付款') }}</button> -->
		
	</view>
</template>

<script>
export default {
	props: {
		info: Object,
		type:{
			type:String,
			default:'order'
		},
		isDetail:Boolean
	},
	computed: {},
	methods:{
		click (type) {
			if(this.isDetail){
				switch (type){
					case 1:
					this.$emit('cancel')
					break
					case 2:
					this.$emit('pay')
					break
				}
			}
		}
	}
}
</script>

<style lang="scss" scoped>
	.button-list {
		padding: 20rpx 30rpx;
		button {
			width: 172rpx;
			height: 60rpx;
			line-height: 60rpx;
			font-size: 30rpx;
			border-radius: 30rpx;
			background: var(--color-primary);
			color: #fff;
			margin: 0;
			padding: 0;
		}
		.button-white {
			border: 1px solid #b4b4b4;
			color: #353535;
			background: #fff;
		}
	}
</style>
